package org.domain.prosoft.session;

import org.domain.prosoft.session.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("incidenteList")
public class IncidenteList extends EntityQuery<Incidente> {

	private static final String EJBQL = "select incidente from Incidente incidente";

	private static final String[] RESTRICTIONS = { "lower(incidente.descricao) like concat(lower(#{incidenteList.incidente.descricao}),'%')", };

	private Incidente incidente = new Incidente();

	public IncidenteList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Incidente getIncidente() {
		return incidente;
	}
}
